﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SLS.Controls"
    >

    <!-- Header control-->
    <Style x:Key="{x:Type local:StandaloneHeader}" TargetType="{x:Type local:StandaloneHeader}">
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:StandaloneHeader}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="2" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60" />
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Rectangle Grid.ColumnSpan="3" Grid.RowSpan="2" RadiusX="16" RadiusY="16" Fill="{DynamicResource ShineBrush}" />
                        <Image Grid.RowSpan="2" x:Name="imageHeaderCtrl" Margin="0" Source="{TemplateBinding Image}"
                               Stretch="None"/>

                        <TextBlock Grid.Column="2" x:Name="titleHeaderCtrl" FontWeight="Bold" Margin="0,0,0,1"
                                   Foreground="{DynamicResource NormalForegroundBrush}" 
			                VerticalAlignment="Center" FontSize="15" Text="{TemplateBinding Title}"
                            />

                        <TextBlock Grid.Column="2" Grid.Row="1" x:Name="contentHeaderCtrl"
                            Foreground="{DynamicResource NormalForegroundBrush}" 
		                    TextWrapping="Wrap" VerticalAlignment="Center" Text="{TemplateBinding Description}"
                            />
                        <Rectangle Grid.ColumnSpan="3" Grid.Row="2" VerticalAlignment="Stretch" 
                                   Fill="{DynamicResource DefaultBorderBrush}" Visibility="{TemplateBinding HasSeparator }"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>